<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">

<title> 提交记录 3197 - Judge Duck Online </title>

<link rel="icon" type="image/png" href="/images/judgeduck-logo-small.png" />

<script src="/libs/js/jquery-3.2.1.min.js"></script>

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="/libs/css/bootstrap.min.css" />

<!-- Latest compiled and minified JavaScript -->
<script src="/libs/js/bootstrap.min.js"></script>

<link rel="stylesheet" type="text/css" href="/css/main.css" />
<link rel="stylesheet" href="/css/non-responsive.css" type="text/css" />

<script src="/js/md5.js"></script>
<script src="/js/judgeduck.js"></script>

<script type="text/x-mathjax-config">
	MathJax.Hub.Config({
		showProcessingMessages: false,
		tex2jax: {
			inlineMath: [["$", "$"], ["\\\\(", "\\\\)"]],
			processEscapes:true
		},
		menuSettings: {
			zoom: "Hover"
		}
	});
</script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@2.7.1/MathJax.js?config=TeX-AMS_HTML"></script>

<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
<script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>

</head>

<body onload="">

<!-- Fixed navbar -->
<nav class="navbar navbar-default" role="navigation" style="background-color: #eeeeee">
	<div class="container">
		<div class="navbar-header">
			<div class="navbar-brand">
				<a href="/">
					<img src="/images/judgeduck-logo.png" width="40px" height="40px" style="margin:-10px" />
				</a>
			</div>
			<font class="navbar-brand">
				Judge Duck Online
			</font>
		</div>
		<div class="navbar-collapse collapse">
			<ul class="nav navbar-nav">
				<li class="nav-item">
					<a class="nav-link" href="/index/index.html"> 首页 </a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/problems/index.html"> 题目列表 </a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/submissions/index.html"> 提交记录 </a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/blogs/index.html"> 博客 </a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/faq/index.html"> FAQ </a>
				</li>
			</ul>
			<ul class="nav navbar-nav navbar-right">
				<li class="nav-item">
					<a class="nav-link" href="/user/login/index.html"> 登录 </a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/user/register/index.html"> 注册 </a>
				</li>
			</ul>
		</div><!--/.nav-collapse -->
	</div>
</nav>




<div id="main_div" class="container" style="padding-left: 25px; padding-right: 25px">
	<h2> 提交记录 3197 </h2>
	<hr />
	
	<div class="row">
		<div class="col-xs-12">
			<table class="table table-bordered">
				<tr>
					<th class="col-xs-2"> 用户 </th>
					<th class="col-xs-3"> 题目 </th>
					<th class="col-xs-2"> 状态 </th>
					<th class="col-xs-1"> 得分 </th>
					<th class="col-xs-1"> 用时 </th>
					<th class="col-xs-1"> 内存 </th>
					<th class="col-xs-1"> 语言 </th>
					<th class="col-xs-1"> 代码长度 </th>
				</tr>
				<tr>
					<td style='font-size:13px'> <a href="/status/index.html"> Server Status </a>
<a href="http://www.iis7.com" style="display:inline-block;background-color:;color:#fff;padding:2px 5px;font-family:arial;font-size:12px;font-weight:bold;" class="6d833d78a8f9405487c7b23b98551996" target="_blank">iis7站长之家</a> </td>
<td> <a href='/problem/1004a/index.html'> 1004a. 【模板题】高精度乘法2 </a> </td>
<td> Accepted </td>
<td> 100 </td>
<td style='font-size:13px'> 6.083 ms </td>
<td style='font-size:13px'> 16 MB + 576 KB </td>
<td style='font-size:13px'> C++ </td>
<td style='font-size:13px'> 3.58 KB </td>
				</tr>
			</table>
			<table class="table table-bordered">
				<tr>
					<th class="col-xs-6"> 提交时间 </th>
					<th class="col-xs-6"> 评测时间 </th>
				</tr>
				<tr>
					<td style='font-size:13px'> 2018-07-10 14:44:41 </td>
<td style='font-size:13px'> 2019-01-18 22:52:43 </td>
				</tr>
			</table>
			<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.12.0/build/styles/tomorrow.min.css">
			<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.12.0/build/highlight.min.js"></script>
			<script>hljs.initHighlightingOnLoad();</script>
			<div class="row">
				<label for="code"> 代码 </label>
				<pre style="background-color:white"><code class="cpp">#include &lt;iostream&gt;
#include &lt;algorithm&gt;
#include&lt;cmath&gt;
#include&lt;cstring&gt;
#include&lt;vector&gt;
#include&lt;cstdio&gt;
using namespace std;
namespace bigint
{
	int n,m,i,j,rev[4000005],len,ans[4000005];
	struct fushu
	{
		double x,y;
		fushu operator +(fushu z)
		{
			return (fushu){x+z.x,y+z.y};
		}
		fushu operator -(fushu z)
		{
			return (fushu){x-z.x,y-z.y};
		}
		fushu operator *(fushu z)
		{
			return (fushu){x*z.x-y*z.y,x*z.y+y*z.x};
		}
		fushu operator *(double z)
		{
			return (fushu){x*z,y*z};
		}
		fushu operator /(double z)
		{
			return (fushu){x/z,y/z};
		}
	};
	fushu a[4000005],b[4000005];
	int getrev(int l2)
	{
		memset(rev,0,sizeof(rev));
		int len=1,cnt=0;
		while (len&lt;=l2)
		{
			len*=2;
			cnt++;
		}
		for (i=1;i&lt;len;i++) rev[i]=(rev[i/2]/2)|((i&amp;1)&lt;&lt;(cnt-1));
		return len;
	}
	void fft(fushu num[],int len,int op)
	{
		int i,j,k;
		for (i=0;i&lt;len;i++)
		{
			if (rev[i]&gt;i) swap(num[i],num[rev[i]]);
		}
		for (i=2;i&lt;=len;i*=2)
		{
			fushu y=(fushu){cos(3.141592653589793*2.0/((double)i)),sin(-op*3.141592653589793*2.0/((double)i))};
			for (j=0;j&lt;len;j+=i)
			{
				fushu x=(fushu){1,0};
				for (k=j;k&lt;j+i/2;k++)
				{
					fushu z=num[k],w=num[k+i/2]*x;
					fushu sum=z+w,sub=z-w;
					num[k]=sum;
					num[k+i/2]=sub;
					x=x*y;
				}
			}
		}
		if (op==-1)
		{
			for (i=0;i&lt;len;i++) num[i]=num[i]/len;
		}
	}
	string mul(string sa,string sb)
	{
		len=getrev(sa.size()+sb.size());
		//cerr&lt;&lt;len&lt;&lt;endl;
		reverse(sa.begin(),sa.end());
		reverse(sb.begin(),sb.end());
		for (i=0;i&lt;sa.size();i++) a[i]=(fushu){sa[i]-&#x27;0&#x27;,0};
		for (;i&lt;=len;i++) a[i]=(fushu){0,0};
		for (i=0;i&lt;sb.size();i++) b[i]=(fushu){sb[i]-&#x27;0&#x27;,0};
		for (;i&lt;=len;i++) b[i]=(fushu){0,0};
		fft(a,len,1);
		fft(b,len,1);
		for (i=0;i&lt;len;i++) a[i]=a[i]*b[i];
		fft(a,len,-1);
		for (i=0;i&lt;len;i++) ans[i]=(int)(a[i].x+0.5);
		for (i=0;i&lt;len;i++)
		{
			ans[i+1]+=ans[i]/10;
			ans[i]%=10;
		}
		for (i=len-1;i&amp;&amp;(!ans[i]);i--);
		string res;
		for (;~i;i--) res.push_back(ans[i]+&#x27;0&#x27;);
		return res;
	}
	string add(string sa,string sb)
	{
		len=max(sa.size(),sb.size());
		//cerr&lt;&lt;len&lt;&lt;endl;
		reverse(sa.begin(),sa.end());
		reverse(sb.begin(),sb.end());
		int s=0;
		string res=&quot;&quot;;
		for (i=0;i&lt;sa.size()||i&lt;sb.size()||s;i++)
		{
			if (i&lt;sa.size()) s+=sa[i]-&#x27;0&#x27;;
			if (i&lt;sb.size()) s+=sb[i]-&#x27;0&#x27;;
			res.push_back(s%10+&#x27;0&#x27;);
			s/=10;
		}
		reverse(res.begin(),res.end());
		return res;
	}
	string sub(string sa,string sb)
	{
		int la=sa.length(),lb=sb.length(),i,g=0,s=0;
		if (la&lt;lb) return &quot;-1&quot;;
		if (la==lb&amp;&amp;sa&lt;sb) return &quot;-1&quot;;
		reverse(sa.begin(),sa.end());
		reverse(sb.begin(),sb.end());
		vector&lt;int&gt; num;
		for (i=0;i&lt;la;i++)
		{
			if (i&lt;lb) num.push_back(sa[i]-sb[i]); else num.push_back(sa[i]-&#x27;0&#x27;);
		}
		string ans;
		for (i=0;i&lt;num.size();i++)
		{
			while (num[i]&lt;0)
			{
				num[i]+=10;
				num[i+1]--;
			}
		}
		reverse(num.begin(),num.end());
		for (i=0;i&lt;num.size()-1;i++) if (num[i]!=0) break;
		for (;i&lt;num.size();i++) ans.push_back(num[i]+&#x27;0&#x27;);
		return ans;
	}
	string div(string sa,string sb)
	{
		string ans,tmp;
		int la=sa.length(),lb=sb.length(),i,j=0,g=0,s=0;
		tmp=sb;
		if (sub(sa,sb)==&quot;-1&quot;) return &quot;0&quot;;
		while (sub(sa,tmp)!=&quot;-1&quot;)
		{
			tmp.push_back(&#x27;0&#x27;);
			j++;
		}
		tmp.erase(tmp.length()-1);
		j--;
		ans.resize(j+1,&#x27;0&#x27;);
		while (j&gt;=0)
		{
			for(;;)
			{
				string nw=sub(sa,tmp);
				if (nw!=&quot;-1&quot;)
				{
					sa=nw;
					ans[j]++;
				}
				else break;
				//cerr&lt;&lt;sa&lt;&lt;&#x27; &#x27;&lt;&lt;ans&lt;&lt;endl;
			}
			j--;
			tmp.erase(tmp.length()-1,1);
		}
		reverse(ans.begin(),ans.end());
		return ans;
	}
};
string s,t;
char ss[1000005];
int main() {
scanf(&quot;%s\n&quot;,ss);s=ss;
scanf(&quot;%s\n&quot;,ss);t=ss;
puts(bigint::mul(s,t).c_str());
	return 0;
}

</code></pre>
				<br />
				
				<label for="result"> 评测结果 </label><div class="row"><div class="col-xs-12"><div class="alert alert-success"><div class="text-center row"><table class="table table-borderless" style="margin:0px"><tr><td class="col-xs-2" style="vertical-align:middle;padding-left:20px;padding-right:20px"><b>Compilation</b></td><td class="col-xs-2" style="vertical-align:middle">N/A</td><td class="col-xs-2" style="vertical-align:middle">N/A</td><td class="col-xs-2" style="vertical-align:middle">Compile OK</td><td class="col-xs-2" style="vertical-align:middle">Score: N/A</td><td class="col-xs-2" style="vertical-align:middle"><a data-toggle="collapse" href="#detail_1" aria-expanded="false" aria-controls="detail_1">显示更多</a></td></tr></table></div><div class="collapse" id="detail_1"><br /><textarea class="form-control" style="background-color: white" rows="8" readonly>Compiling...
Compile success!
</textarea></div></div><div class="alert alert-success"><div class="text-center row"><table class="table table-borderless" style="margin:0px"><tr><td class="col-xs-2" style="vertical-align:middle;padding-left:20px;padding-right:20px"><b>Testcase #1</b></td><td class="col-xs-2" style="vertical-align:middle">6.083 ms</td><td class="col-xs-2" style="vertical-align:middle">16 MB + 576 KB</td><td class="col-xs-2" style="vertical-align:middle">Accepted</td><td class="col-xs-2" style="vertical-align:middle">Score: 100</td><td class="col-xs-2" style="vertical-align:middle"><a data-toggle="collapse" href="#detail_2" aria-expanded="false" aria-controls="detail_2">显示更多</a></td></tr></table></div><div class="collapse" id="detail_2"><br /><textarea class="form-control" style="background-color: white" rows="8" readonly>verdict = Run Finished
time_ms = 6.083390
mem_kb = 16960
Correct Answer
</textarea></div></div></div></div>
			</div>
		</div>
	</div>

	<hr />
	
	<div class="row">
		<p style="text-align: center; color: #888">
			Judge Duck Online | 评测鸭在线 <br />
			Server Time: 2019-08-02 17:12:40 | Loaded in 1 ms | <a href="/status/index.html"> Server Status </a> <br />
			个人娱乐项目，仅供学习交流使用
		</p>
	</div>
</div>

</body>

</html>
